1. Field of the Invention
This invention relates to computer systems and, more particularly, to identifying pathnames within a file system.
2. Description of the Related Art
File systems organize and manage information stored in a computer system. Typically, information is stored in the form of files. File systems may support the organization of user data by providing and tracking organizational structures such as folders and directories. The file system may interpret and access information physically stored in a variety of storage media, abstracting complexities associated with the tasks of locating, retrieving, and writing data to the storage media.
Files are typically located by specifying a path to that file. The path may indicate which directories or folders include that particular file. A typical path is a sequence of directory or folder names, starting at the file system's root directory, and ending with the name of the file or directory being identified.
In some operating environments such as UNIX, information about each file in the file system is kept in a metadata structure called an inode. The inode contains metadata, which includes a pointer to the physical blocks containing the data in the file and information indicating the type of file, the permission bits, the owner and group, the file size, and the file modification date and time.
An inode does not include the filename of the file to which the inode corresponds. Because of this, it is relatively difficult to determine the filename of a file, given only information identifying that file's inode. For example, in UNIX, programs such as ff(7) and ncheck(1M) provide mechanisms for determining the pathname of a file from an inode identifier (also referred to as a performing a reverse pathname lookup) by scanning each directory in the file system for the inode identifier. Scanning each directory may take an undesirable amount of time.